using System;
using System.Collections.Generic;
using Webshop20.Domain.Orders.Core;
using Webshop20.Domain.Stock.DataTransferObjects;

namespace Webshop20.Domain.Orders.Translations
{
    public class GoodTranslator : IGoodTranslator
    {
        public IEnumerable<AttemptedReservation> ConvertToAttemptedReservations(IEnumerable<Position> positions)
        {
            foreach (var position in positions)
            {
                yield return new AttemptedReservation(position.Product.PurchasOrderNumber, position.Quantity);
            }
        }
    }
}